<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:h="http://java.sun.com/jsf/html">
<body>
	<ui:composition template="/template.xhtml">

		<ui:define name="right">
		</ui:define>

		<ui:define name="center">
			<h2>#{bundle.ViewPlatformShowAllLink}</h2>

			<p:panel header="#{bundle.ListPlatformTitle}">
				<h:form id="form">

					<p:dataTable id="platforms" var="platform"
						value="#{platformController.platformList}" rowKey="#{platform.id}"
						paginator="true" rows="10" rowStyleClass="lista"
						emptyMessage="nessuna piattaforma nel database">

						<p:column headerText="#{bundle.ListPlatformTitle_name}"
							filterBy="#{platform.accessionName}" filterMatchMode="contains">
							<h:outputText value="#{platform.accessionName}" />
						</p:column>

						<p:column headerText="#{bundle.ListPlatformTitle_title}"
							filterBy="#{platform.title}" filterMatchMode="contains">
							<h:outputText value="#{platform.title}" />
						</p:column>

						<p:column headerText="#{bundle.ListPlatformTitle_type}"
							filterBy="#{platform.typePlatform.name}"
							filterMatchMode="contains">
							<h:outputText value="#{platform.typePlatform.name}" />
						</p:column>

						<p:column headerText="#{bundle.ListPlatformTitle_organismName}"
							filterBy="#{platform.organism.name}" filterMatchMode="contains">
							<h:outputText value="#{platform.organism.name}" />
						</p:column>

						<p:column>
							<h:panelGrid columns="3" cellpadding="2">
								<p:commandButton action="showDetails"
									image="ui-icon ui-icon-search" title="Details" ajax="false">
									<f:setPropertyActionListener
										target="#{platformController.platform}" value="#{platform}" />
								</p:commandButton>

							</h:panelGrid>
						</p:column>

					</p:dataTable>

				</h:form>
			</p:panel>

		</ui:define>

	</ui:composition>
</body>
</html>
